package com.jxs.android.ges;

import android.app.ActivityGroup;
import android.app.Dialog;
import android.content.Context;

import com.jxs.android.util.StartHelper;
import com.jxs.android.weiget.BuAlertDailog;
import com.jxs.android.weiget.PopMsg;

public class AbstractActivityGroup extends ActivityGroup{
	public void errorMsgPop(int msgId) {
		PopMsg.show(this, msgId);
	}

	public void errorMsgPop(String message) {
		PopMsg.show(this, message);
	}

	public void errorMsgPop(String message, BuAlertDailog.IPhoneAlertDailog alertOkListener) {
		PopMsg.show(this, message, alertOkListener);
	}

	public void errorMsgToLogin(String msg) {
		errorMsgPop(msg, new BuAlertDailog.IPhoneAlertDailog() {
			@Override
			public void okLogic(Dialog dialog) {
				dialog.dismiss();
				StartHelper.startActivity(Login.class);
			}

			@Override
			public String getOkText(Context context) {
				return null;
			}
		});
	}
}
